/**业务费 */
<template>
  <div>
    <el-form :model="queryForm" ref='formName' :rules="rules" >
      <div>
        <el-input disabled v-model="valFee" style="width:20%"></el-input>元
      </div>
      <table  class="personal">
        <tr v-for="(item,index) in queryForm.tableList" :key='index'>
            <td class="courseTemplate-td1">
                <label>{{item.label}}：</label>
                <el-tooltip placement="bottom" effect="light">
                  <div slot="content">
                  <!-- 竞教结合课程名称，或者相关度高的课程名称， -->
                  {{item.title}}
                  </div>
                  <img :src="images" alt="" >
                </el-tooltip>
            </td>
            <td class="courseTemplate-td2">
              <el-button type="text"   @click="btnAssignment(index,item.label)">{{item.value}}</el-button>
            </td>
        </tr>
      </table>
      <el-dialog
        :title="compile+'-'+labeList"
        :visible.sync="dialogVisible"
        width="50%"
        :close-on-click-modal='false'
        :before-close="handleClose">
        <!-- <el-button type="text" :disabled="compile=='审核'||compile=='查看'"  @click="addMore">{{$t('添加更多')}}</el-button> -->
        <!-- <elTableList :tableData='tableData' ref='table' @calculate='calculateClick' :compile='compile'></elTableList> -->
        <el-row style="margin-bottom: 10px;" type="flex" class="row-bg" justify="end">
          <el-button type="primary"  :disabled="compile==='审核'||compile==='查看'"  @click="addMore">添加更多</el-button>
        </el-row>
        <elTableList :tableData='tableData' ref='table' :requireInput="requireInput" :index='index' @change-addMore='changeAddMore' :labeList='labeList'  @valFee-click='valFeeClick' :compile='compile' @change-tab='changeClick'></elTableList>
        <span slot="footer" class="dialog-footer">
          <el-button @click="handleClose">取消</el-button>
          <el-button type="primary" :disabled="compile==='审核'||compile==='查看'" @click="confirm">确定</el-button>
        </span>
      </el-dialog>
    </el-form>
  </div>
</template>
<script>
import elTableList from './elTableList'
export default {
  components: {
    elTableList
  },
  props: {
      compile: {
        type: String,
        default: ''
      },
      compiles: {
        type: String,
        default: ''
      },
      compileList: {
          type: String,
          default: ''
      },
      dataList: {
          type: Object,
          default: () => {}
      },
      requireInput: {
          type: Boolean,
          default: true
      }
  },
  data() {
    let cannotEnter = (rule, value, callback) => {
        let reg = /[`$]/im
        if (reg.test(value)) {
            return callback(new Error(this.$t('identificationToDoList.cannotContain')))
        } 
        // else if (value === '') {
        //     return callback()
        //     // return callback(new Error(this.$t('internship.pleaseEnter')))
        // }
        return callback()
    }
    return{
      fileList: [],
      options: {
        faculty: [],
        country: [],
        nameSchool: []
      },
      compileEdit: '',
      labeList: '',
      images: 'static/images/icon/icon-help.png',
      queryForm: {
        textarea: {
          firstType: 3,
          remark: ''
        },
        tableList: [
          { label: this.$t('projectDeclara.travelli'), value: 0,title: '⑴差旅费中，包车需到有保险的大型租车公司租赁并提供包车、租车协议⑵教师补贴按照学校规定：市内交通费80元/天，餐费100元/天；注：有补贴就不报销发票。⑶学生补贴参照教师标准50%。⑷参赛人数制定：在参加校外赛时，参赛队数及组队人数标准取决于比赛形式，答辩类比赛原则上选派学生代表参加。'},
          { label: this.$t('projectDeclara.conference'), value: 0, title: "项目建设中组织召开会议过程中按规定开支的场地租用费、住宿费、伙食补助费以及文件资料的印刷费。按会议费标准列支 。"},
          { label: this.$t('projectDeclara.internationals'), value: 0,title: "出国费：工作人员出国开展学术交流等活动开支的住宿费、旅费、杂费等，参照国际交流标准，学生无补贴费用。（仅限国际竞赛）"},
          { label: this.$t('projectDeclara.literature'), value: 0,title: "项目建设中发生的印刷费、资料费、宣传费、出版费、邮寄费、论文版面费、会费、网络费。"},
          { label: this.$t('projectDeclara.lease'), value: 0,title: "项目建设中发生的租赁费用，包括设备租赁费、场地租赁费。"},
          { label: this.$t('projectDeclara.testProcess'), value: 0,title: "进行测试化验加工等委托业务发生的支出。"},
          { label: this.$t('projectDeclara.expenses'), value: 0,title: "报名费、学生活动费及其他（其中承办赛事的工作餐：老师50元/人，学生30元/人）；办公用品不可支出。"}
        ],
        studentListOne: [
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, threeOneType: 1, secondType: 1 }
        ],
        studentListTowType: [
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, threeOneType: 2, secondType: 1 }
        ],
        studentListSanType: [
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, threeOneType: 3, secondType: 1 }
        ],
        studentListTow: [
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 2 }
        ],
        studentListSan: [
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 3 }
        ],
        studentListFour: [
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 4 }
        ],
        studentListFive: [
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 5 }
        ],
      },
      valFee: 0,
      rulesOne: {
        personnelCost: [
          { validator: cannotEnter, trigger: 'blur' }
        ],
        workContent: [
          { validator: cannotEnter, trigger: 'blur' }
        ],
        remark: [
          { validator: cannotEnter, trigger: 'blur' }
        ],
        budget: [
          { validator: this.validateWeight, trigger: 'blur' }
        ]
      },
      rulesTow: {
        personnelCost: [
          { validator: cannotEnter, trigger: 'blur' }
        ],
        workContent: [
          { validator: cannotEnter, trigger: 'blur' }
        ],
        remark: [
          { validator: cannotEnter, trigger: 'blur' }
        ],
        budget: [
          { validator: this.validateWeight, trigger: 'blur' }
        ]
      },
      dialogVisible: false,
      index: '',
      restaurants: [],
      semester: [],
      semesterRmpor: [],
      multipleSelection: [],
      tableData: []
    };
  },
  filters: {
    collegeAcademyList(val, array) {
      let str = "";
      for (let item of array) {
        if (val === item.value) {
          str = item.label;
        }
      }
      return str;
    }
  },
  methods: {
    setIntervalDate() {
      setInterval(() => {
        this.changeTbel()
        this.calculateMoney()
      }, 1000)
    },
    // 点击计算某行金额
    changeClick(data,index) {
      if (index === 0) {
        this.queryForm.studentListOne = data
      } else if (index === 1) {
        this.queryForm.studentListTowType = data
      } else if (index === 2) {
        this.queryForm.studentListSanType = data
      } else if (index === 3) {
        this.queryForm.studentListTow = data
      } else if (index === 4) {
        this.queryForm.studentListSan = data
      } else if (index === 5) {
        this.queryForm.studentListFour = data
      } else if (index === 6) {
        this.queryForm.studentListFive = data
      }
    },
    valFeeClick(num,index) {
      this.queryForm.tableList[index].value = num
      // this.calculateMoney()
    },
    // 打开弹框
    btnAssignment(index,label) {
      this.labeList = label
      this.index = index
      if (index === 0) {
        if (this.queryForm.studentListOne.length<10) {
          for (let index = this.queryForm.studentListOne.length; index < 10; index++) {
            this.queryForm.studentListOne.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, threeOneType: 1, secondType: 1 }
            )
          }
        }
        this.tableData = this.queryForm.studentListOne
      } 
      if (this.index === 1) {
        if (this.queryForm.studentListTowType.length<10) {
          for (let index = this.queryForm.studentListTowType.length; index < 10; index++) {
            this.queryForm.studentListTowType.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, threeOneType: 2, secondType: 1 }
            )
          }
        }
        this.tableData = this.queryForm.studentListTowType
      } 
      if (this.index === 2) {
        if (this.queryForm.studentListSanType.length<10) {
          for (let index = this.queryForm.studentListSanType.length; index < 10; index++) {
            this.queryForm.studentListSanType.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, threeOneType: 3, secondType: 1 }
            )
          }
        }
        this.tableData = this.queryForm.studentListSanType
      } 
      if (index === 3) {
        if (this.queryForm.studentListTow.length<10) {
          for (let index = this.queryForm.studentListTow.length; index < 10; index++) {
            this.queryForm.studentListTow.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 2 }
            )
          }
        }
        this.tableData = this.queryForm.studentListTow
      } 
      if (this.index === 4) {
        if (this.queryForm.studentListSan.length<10) {
          for (let index = this.queryForm.studentListSan.length; index < 10; index++) {
            this.queryForm.studentListSan.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 3 }
            )
          }
        }
        this.tableData = this.queryForm.studentListSan
      } 
      if (this.index === 5) {
        if (this.queryForm.studentListFour.length<10) {
          for (let index = this.queryForm.studentListFour.length; index < 10; index++) {
            this.queryForm.studentListFour.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 4 }
            )
          }
        }
        this.tableData = this.queryForm.studentListFour
      } 
      if (this.index === 6) {
        if (this.queryForm.studentListFive.length<10) {
          for (let index = this.queryForm.studentListFive.length; index < 10; index++) {
            this.queryForm.studentListFive.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 5 }
            )
          }
        }
        this.tableData = this.queryForm.studentListFive
      }
      this.dialogVisible = true
      
    },
    changeAddMore(data) {
      this.tableData = data
    },
    // 添加更多
    addMore() {
      this.$refs.table.addMore()
      if (this.index==0) {
        this.tableData.push(
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, threeOneType: 1, secondType: 1 }
        )
      } else if (this.index === 1) {
        this.tableData.push(
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, threeOneType: 2, secondType: 1 }
        )
      } else if (this.index === 2) {
        this.tableData.push(
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, threeOneType: 3, secondType: 1 }
        )
      } else if (this.index === 3) {
        this.tableData.push(
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 2 }
        )
      } else if (this.index === 4) {
        this.tableData.push(
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 3 }
        )
      } else if (this.index === 5) {
        this.tableData.push(
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 4 }
        )
      } else if (this.index === 6) {
        this.tableData.push(
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 5 }
        )
      }
    },
    // 弹框确定
    confirm() {
      this.$refs.table.calculateMoney()
      this.$refs.table.changeTbel()
      this.dialogVisible = false
      this.changeTbel()
      this.calculateMoney()
    },
    // 关闭弹框
    handleClose() {
      this.tableData = []
      this.dialogVisible = false
    },
    validateWeight(rule, value, callback) {
      if (value > 0) {
        // let expReg = /^([1-9][0-9]*)+(.[0-9]{1,2})?$/
        let expReg = /^[1-9]$|^([0-9])+(.[0-9]{1,2})?$/
        if (!expReg.test(value)) {
          callback(new Error(this.$t('projectDeclara.decimalPlace')))
        } else {
          callback()
        }
      } else {
        callback(new Error(this.$t('projectDeclara.decimalPlace')))
      }
    },
    // 保存
    internAssignment(data, index, num) {
      let expReg = /^[1-9]$|^([0-9])+(.[0-9]{1,2})?$/
      if (!expReg.test(data.budget)) {
        this.$set(data, 'budget', null)
      } 
      let reg = /[`$]/im
      if (reg.test(data.personnelCost)) {
        this.$set(data, 'personnelCost', '')
      } 
      if (reg.test(data.workContent)) {
        this.$set(data, 'workContent', '')
      }
      if (reg.test(data.remark)) {
        this.$set(data, 'remark', '')
      }
      if (data.personnelCost&&data.workContent&&data.budget&&data.remark) {
        this.$set(data, 'flag', true)
        if (this.compileEdit !== '编辑') {
          if (num === 'one') {
            this.queryForm.studentListOne.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, threeOneType: 1, secondType: 1 }
            )
          } else if (num === 'towType') {
            this.queryForm.studentListTowType.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, threeOneType: 2, secondType: 1 }
            )
          } else if (num === 'sanType') {
            this.queryForm.studentListSanType.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, threeOneType: 3, secondType: 1 }
            )
          } else if (num === 'tow') {
            this.queryForm.studentListTow.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 2 }
            )
          } else if (num === 'san') {
            this.queryForm.studentListSan.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 3 }
            )
          } else if (num === 'four') {
            this.queryForm.studentListFour.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 4 }
            )
          } else if (num === 'five') {
            this.queryForm.studentListFive.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 3, secondType: 5 }
            )
          }
        } else {
          this.compileEdit = ''
        }
        this.changeTbel()
        this.calculateMoney()
      } else {
        return this.$message.warning('请检查数据是否填写完整')
      }
    },
    changeTbel() {
      // if (this.queryForm.studentListTow.length > 1 || this.queryForm.studentListOne.length > 1 || this.queryForm.studentListSan.length > 1|| this.queryForm.studentListFour.length > 1|| this.queryForm.studentListFive.length > 1) {
        this.queryForm.list = this.queryForm.studentListTow.concat(this.queryForm.studentListOne,this.queryForm.studentListSan,this.queryForm.studentListFour,this.queryForm.studentListFive,this.queryForm.studentListSanType,this.queryForm.studentListTowType)
        this.$emit('changeTab', this.queryForm)
      // }
    },
    // 编辑
    submitResults(data, index, num) {
      this.compileEdit = '编辑'
      this.$set(data, 'flag', false)
      this.changeTbel()
      this.calculateMoney()
    },
    // 删除
    selectEvalResubmit(data, index, num) {
      this.$delConfirm().then(() => {
        if (num === 'one') {
          this.queryForm.studentListOne.splice(index,1)
        } else if (num === 'towType') {
          this.queryForm.studentListTowType.splice(index,1)
        } else if (num === 'sanType') {
          this.queryForm.studentListSanType.splice(index,1)
        } else if (num === 'tow') {
          this.queryForm.studentListTow.splice(index,1)
        } else if (num === 'san') {
          this.queryForm.studentListSan.splice(index,1)
        } else if (num === 'four') {
          this.queryForm.studentListFour.splice(index,1)
        } else if (num === 'five') {
          this.queryForm.studentListFive.splice(index,1)
        }
        this.changeTbel()
        this.calculateMoney()
      }).catch(() => {
        this.$message({
          type: 'info',
          message: this.$t('internship.cancelOpera')
        });  
      });
      
    },
    calculateMoney() {
      this.valFee = 0
      this.queryForm.tableList.forEach(el => {
        if (el.value) {
          this.valFee+=Math.round(Number(el.value.toFixed(2))*100)/100 
        }
      })
      Math.round(this.valFee.toFixed(2)*100)/100
      this.$emit('change-valFee',this.valFee)
    }
  },
  destroyed(){
    // 在页面销毁后，清除计时器
    clearInterval(this.setIntervalDate); //清除计时器
  },
  mounted() {
    if (this.dataList.planBudgetListThree.length>0) {
        // this.tableData = this.dataList.budgetListThree
        let studentListOne = []
        let studentListTow = []
        let studentListSan = []
        let studentListFour = []
        let studentListFive = []
        let studentListTowType = []
        let studentListSanType = []
        this.dataList.planBudgetListThree.forEach(el => {
          if (!el.secondType) {
            this.queryForm.textarea.remark = ''
          }
          // let eltd = el.personnelCost&&el.budget&&el.remark
          // if (eltd) {

            if (el.firstType==3&&el.secondType==1&&el.threeOneType==1) {
              studentListOne.push(el)
            }
            if (el.firstType==3&&el.secondType==1&&el.threeOneType==2) {
              studentListTowType.push(el)
            }
            if (el.firstType==3&&el.secondType==1&&el.threeOneType==3) {
              studentListSanType.push(el)
            }
            if (el.firstType==3&&el.secondType==2) {
              studentListTow.push(el)
            }
            if (el.firstType==3&&el.secondType==3) {
              studentListSan.push(el)
            }
            if (el.firstType==3&&el.secondType==4) {
              studentListFour.push(el)
            }
            if (el.firstType==3&&el.secondType==5) {
              studentListFive.push(el)
            }
          // }
          
        })
        this.queryForm.studentListOne = studentListOne
        this.queryForm.studentListTow = studentListTow
        this.queryForm.studentListSan = studentListSan
        this.queryForm.studentListFour = studentListFour
        this.queryForm.studentListFive = studentListFive
        this.queryForm.studentListTowType = studentListTowType
        this.queryForm.studentListSanType = studentListSanType
        this.valFee = 0
        let one = 0
        let towType = 0
        let sanType = 0
        let tow = 0
        let san = 0
        let four = 0
        let five = 0
        this.queryForm.studentListTowType.forEach(el => {
          if (el.budget) {
            towType+=Number(el.budget) 
          }
        })
        this.queryForm.studentListSanType.forEach(el => {
          if (el.budget) {
            sanType+=Number(el.budget) 
          }
        })
        this.queryForm.studentListOne.forEach(el => {
          if (el.budget) {
            one+=Number(el.budget) 
          }
        })
        this.queryForm.studentListTow.forEach(el => {
          if (el.budget) {
            tow+=Number(el.budget) 
          }
        })
        this.queryForm.studentListSan.forEach(el => {
          if (el.budget) {
            san+=Number(el.budget) 
          }
        })
        this.queryForm.studentListFour.forEach(el => {
          if (el.budget) {
            four+=Number(el.budget) 
          }
        })
        this.queryForm.studentListFive.forEach(el => {
          if (el.budget) {
            five+=Number(el.budget) 
          }
        })
        this.queryForm.tableList[0].value = one
        this.queryForm.tableList[1].value = towType
        this.queryForm.tableList[2].value = sanType
        this.queryForm.tableList[3].value = tow
        this.queryForm.tableList[4].value = san
        this.queryForm.tableList[5].value = four
        this.queryForm.tableList[6].value = five
        this.valFee += one+tow+san+four+five+sanType+towType
        Math.round(this.valFee*100)/100
        this.$emit('change-valFee',this.valFee)
    }
    this.$nextTick(() => {
      if (this.compile!=='审核'||this.compile!=='查看') {
        this.setIntervalDate()
      }
    })
    // if (this.dataList) {
    //   if (this.compile=='编辑') {
    //     if (this.compiles=='任务书') {
    //       return this.dataList = null
    //     }
    //     if (this.dataList.planBudgetListThree.length>0) {
    //       if (this.compileList == '学校编辑') {
    //         this.dataList.planBudgetListThree.forEach(el => {
    //           if (!el.secondType) {
    //             this.queryForm.textarea.remark = el.remark
    //           }
    //           if (el.firstType==3&&el.secondType==1&&el.threeOneType==1) {
    //             this.$set(el, 'flag', true)
    //             this.queryForm.studentListOne.unshift(el)
    //           }
    //           if (el.firstType==3&&el.secondType==1&&el.threeOneType==2) {
    //             this.$set(el, 'flag', true)
    //             this.queryForm.studentListTowType.unshift(el)
    //           }
    //           if (el.firstType==3&&el.secondType==1&&el.threeOneType==3) {
    //             this.$set(el, 'flag', true)
    //             this.queryForm.studentListSanType.unshift(el)
    //           }
    //           if (el.firstType==3&&el.secondType==2) {
    //             this.$set(el, 'flag', true)
    //             this.queryForm.studentListTow.unshift(el)
    //           }
    //           if (el.firstType==3&&el.secondType==3) {
    //             this.$set(el, 'flag', true)
    //             this.queryForm.studentListSan.unshift(el)
    //           }
    //           if (el.firstType==3&&el.secondType==4) {
    //             this.$set(el, 'flag', true)
    //             this.queryForm.studentListFour.unshift(el)
    //           }
    //           if (el.firstType==3&&el.secondType==5) {
    //             this.$set(el, 'flag', true)
    //             this.queryForm.studentListFive.unshift(el)
    //           }
    //         })
            
    //         this.valFee = 0
    //         let one = 0
    //         let towType = 0
    //         let sanType = 0
    //         let tow = 0
    //         let san = 0
    //         let four = 0
    //         let five = 0
    //         if (this.queryForm.studentListTowType.length > 0) {
    //           this.queryForm.studentListTowType.forEach(el => {
    //             if (el.budget) {
    //               towType+=Number(el.budget) 
    //             }
    //           })
    //         } 
    //         if (this.queryForm.studentListSanType.length > 0) {
    //           this.queryForm.studentListSanType.forEach(el => {
    //             if (el.budget) {
    //               sanType+=Number(el.budget) 
    //             }
    //           })
    //         } 
    //         if (this.queryForm.studentListOne.length > 0) {
    //           this.queryForm.studentListOne.forEach(el => {
    //             if (el.budget) {
    //               one+=Number(el.budget) 
    //             }
    //           })
    //         } 
    //         if (this.queryForm.studentListTow.length > 0) {
    //           this.queryForm.studentListTow.forEach(el => {
    //             if (el.budget) {
    //               tow+=Number(el.budget) 
    //             }
    //           })
    //         } 
    //         if (this.queryForm.studentListSan.length > 0) {
    //           this.queryForm.studentListSan.forEach(el => {
    //             if (el.budget) {
    //               san+=Number(el.budget) 
    //             }
    //           })
    //         } 
    //         if (this.queryForm.studentListFour.length > 0) {
    //           this.queryForm.studentListFour.forEach(el => {
    //             if (el.budget) {
    //               four+=Number(el.budget) 
    //             }
    //           })
    //         } 
    //         if (this.queryForm.studentListFive.length > 0) {
    //           this.queryForm.studentListFive.forEach(el => {
    //             if (el.budget) {
    //               five+=Number(el.budget) 
    //             }
    //           })
    //         } 
    //         this.valFee += one+tow+san+four+five+towType+sanType
    //         Math.round(this.valFee*100)/100
    //         this.queryForm.list = this.queryForm.studentListTow.concat(this.queryForm.studentListOne,this.queryForm.studentListSan,this.queryForm.studentListFour,this.queryForm.studentListFive)
    //         this.$emit('changeTab', this.queryForm)
    //         this.$emit('change-valFee',this.valFee)
    //       } else {
    //         this.dataList.planBudgetListThree.forEach(el => {
    //           if (!el.secondType) {
    //             this.queryForm.textarea.remark = el.remark
    //           }
    //           if (el.firstType==3&&el.secondType==1&&el.threeOneType==1) {
    //             this.$set(el, 'flag', false)
    //             this.queryForm.studentListOne.unshift(el)
    //             this.queryForm.studentListOne.splice(-1,1)
    //           }
    //           if (el.firstType==3&&el.secondType==1&&el.threeOneType==2) {
    //             this.$set(el, 'flag', false)
    //             this.queryForm.studentListTowType.unshift(el)
    //             this.queryForm.studentListTowType.splice(-1,1)
    //           }
    //           if (el.firstType==3&&el.secondType==1&&el.threeOneType==3) {
    //             this.$set(el, 'flag', false)
    //             this.queryForm.studentListSanType.unshift(el)
    //             this.queryForm.studentListSanType.splice(-1,1)
    //           }
    //           if (el.firstType==3&&el.secondType==2) {
    //             this.$set(el, 'flag', false)
    //             this.queryForm.studentListTow.unshift(el)
    //             this.queryForm.studentListTow.splice(-1,1)
    //           }
    //           if (el.firstType==3&&el.secondType==3) {
    //             this.$set(el, 'flag', false)
    //             this.queryForm.studentListSan.unshift(el)
    //             this.queryForm.studentListSan.splice(-1,1)
    //           }
    //           if (el.firstType==3&&el.secondType==4) {
    //             this.$set(el, 'flag', false)
    //             this.queryForm.studentListFour.unshift(el)
    //             this.queryForm.studentListFour.splice(-1,1)
    //           }
    //           if (el.firstType==3&&el.secondType==5) {
    //             this.$set(el, 'flag', false)
    //             this.queryForm.studentListFive.unshift(el)
    //             this.queryForm.studentListFive.splice(-1,1)
    //           }
    //         })
    //         this.calculateMoney()
    //       }
    //     }
    //   }  
    //   if (this.compile=='审核' ||this.compile=='查看') {
    //     this.dataList.planBudgetListThree.forEach(el => {
    //       if (!el.secondType) {
    //         this.queryForm.textarea.remark = el.remark
    //       }
    //       if (el.firstType==3&&el.secondType==1&&el.threeOneType==1) {
    //         this.$set(el, 'flag', false)
    //         this.queryForm.studentListOne.unshift(el)
    //         this.queryForm.studentListOne.splice(-1,1)
    //       }
    //       if (el.firstType==3&&el.secondType==1&&el.threeOneType==2) {
    //         this.$set(el, 'flag', false)
    //         this.queryForm.studentListTowType.unshift(el)
    //         this.queryForm.studentListTowType.splice(-1,1)
    //       }
    //       if (el.firstType==3&&el.secondType==1&&el.threeOneType==3) {
    //         this.$set(el, 'flag', false)
    //         this.queryForm.studentListSanType.unshift(el)
    //         this.queryForm.studentListSanType.splice(-1,1)
    //       }
    //       if (el.firstType==3&&el.secondType==2) {
    //         this.$set(el, 'flag', false)
    //         this.queryForm.studentListTow.unshift(el)
    //         this.queryForm.studentListTow.splice(-1,1)
    //       }
    //       if (el.firstType==3&&el.secondType==3) {
    //         this.$set(el, 'flag', false)
    //         this.queryForm.studentListSan.unshift(el)
    //         this.queryForm.studentListSan.splice(-1,1)
    //       }
    //       if (el.firstType==3&&el.secondType==4) {
    //         this.$set(el, 'flag', false)
    //         this.queryForm.studentListFour.unshift(el)
    //         this.queryForm.studentListFour.splice(-1,1)
    //       }
    //       if (el.firstType==3&&el.secondType==5) {
    //         this.$set(el, 'flag', false)
    //         this.queryForm.studentListFive.unshift(el)
    //         this.queryForm.studentListFive.splice(-1,1)
    //       }
    //     })
    //     this.valFee = 0
    //     let one = 0
    //     let sanType = 0
    //     let towType = 0
    //     let tow = 0
    //     let san = 0
    //     let four = 0
    //     let five = 0
    //     if (this.queryForm.studentListTowType.length > 0) {
    //       this.queryForm.studentListTowType.forEach(el => {
    //         if (el.budget) {
    //           towType+=Number(el.budget) 
    //         }
    //       })
    //     } 
    //     if (this.queryForm.studentListSanType.length > 0) {
    //       this.queryForm.studentListSanType.forEach(el => {
    //         if (el.budget) {
    //           sanType+=Number(el.budget) 
    //         }
    //       })
    //     } 
    //     if (this.queryForm.studentListOne.length > 0) {
    //       this.queryForm.studentListOne.forEach(el => {
    //         if (el.budget) {
    //           one+=Number(el.budget) 
    //         }
    //       })
    //     } 
    //     if (this.queryForm.studentListTow.length > 0) {
    //       this.queryForm.studentListTow.forEach(el => {
    //         if (el.budget) {
    //           tow+=Number(el.budget) 
    //         }
    //       })
    //     } 
    //     if (this.queryForm.studentListSan.length > 0) {
    //       this.queryForm.studentListSan.forEach(el => {
    //         if (el.budget) {
    //           san+=Number(el.budget) 
    //         }
    //       })
    //     } 
    //     if (this.queryForm.studentListFour.length > 0) {
    //       this.queryForm.studentListFour.forEach(el => {
    //         if (el.budget) {
    //           four+=Number(el.budget) 
    //         }
    //       })
    //     } 
    //     if (this.queryForm.studentListFive.length > 0) {
    //       this.queryForm.studentListFive.forEach(el => {
    //         if (el.budget) {
    //           five+=Number(el.budget) 
    //         }
    //       })
    //     } 
    //     this.valFee += one+tow+san+four+five+towType+sanType
    //     Math.round(this.valFee*100)/100
    //     this.$emit('change-valFee',this.valFee)
    //   }
    // }
    
  }
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.personal {
	border-collapse: collapse;
	border: 1px solid #000000;
	margin: 20px;
	td,
	th {
		line-height: 30px;
		border-collapse: collapse;
		border: 1px solid #a5a5a5;
		background: #fff;
		color: #606266;
	}
	label {
		color: #999;
    }
    .courseTemplate-td1 {
       width:20%;
       background: #F5F7F9;
       text-align: center;
    }
    .courseTemplate-td2 {
       width:20%;
       background: #fdfeff;
       text-align: center;
    }
}
.p_cals:hover{
  cursor: pointer;
  color: #409eff;
}
.p_cals{
  color: #aaa
}
.inner-breadcrumb {
    .breadcrumb {
        span {
            font-weight: normal;
            color: #aaa;
        }
        a {
            font-weight: normal;
            color: #aaa;
        }
        a:hover {
            color: #409eff;
        }
        .last {
            font-weight: bold !important;
            cursor: default !important;
        }
        .disable {
            cursor: default !important;
        }
    }
}
.condition-title-p {
    font-weight: 400;
    font-style: normal;
    color: #2b3b4e;
    font-size: 18px;
    margin-bottom: 15px;
}
.base-info-title {
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    color: #2b3b4e;
}
.table-style-baseinfo {
    background-color: rgba(210, 212, 214, 1);
    box-sizing: border-box;
    border-width: 0.5px;
    border-style: solid;
    border-color: rgba(210, 212, 214, 1);
    border-radius: 0px;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    width: 100%;
    font-weight: 401;
    font-style: normal;
    font-size: 14px;
    color: #8896a7;
    margin-bottom: 20px;
}

.table-style-baseinfo td {
    width: 25%;
    background-color: rgba(255, 255, 255, 1);
    border: none;
    border-radius: 0px;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    font-weight: 401;
    font-style: normal;
    font-size: 14px;
    color: #2b3b4e;
    height: 32px;
    padding: 0 10px;
}

.table-style-baseinfo .text-right-background-color {
    background-color: #fdfeff4d;
    text-align: right;
}

.text-left-background-none {
    text-align: left;
}
</style>